package Message.Game
{
    import Framework.MQ.*;
    import Framework.Serialize.*;
    import Message.Public.*;
    import flash.utils.*;

    public class SPetBag extends Object implements IMessageBase
    {
        public var entityId:SEntityId;
        public var posType:int;
        public var capacity:int;
        public var dictIntStr:Dictionary;
        public var petInfos:Array;
        public const _type:int = 12024;
        public static var _regist:SPetBag = new SPetBag(true);

        public function SPetBag(param1:Boolean = false)
        {
            if (param1)
            {
                MessageManager.instance().regist(this);
            }
            
        }

        public function getType() : int
        {
            return this._type;
        }

        public function clone() : IMessageBase
        {
            return new SPetBag();
        }

        public function __write(param1:SerializeStream) : void
        {
            this.entityId.__write(param1);
            param1.writeInt(this.posType);
            param1.writeInt(this.capacity);
            DictIntStrHelper.write(param1, this.dictIntStr);
            SeqSPetInfoHelper.write(param1, this.petInfos);
            
        }

        public function __read(param1:SerializeStream) : void
        {
            this.entityId = new SEntityId();
            this.entityId.__read(param1);
            this.posType = param1.readInt();
            this.capacity = param1.readInt();
            this.dictIntStr = DictIntStrHelper.read(param1);
            this.petInfos = SeqSPetInfoHelper.read(param1);
            
        }

    }
}
